package bit1;

import java.util.ArrayList;
import java.util.List;

class Main44 {
    public static void func(String str1,String str2){
        if (str1==null||str2==null){
            return;
        }
        char ch1[]=str1.toCharArray();
        char ch2[]=str2.toCharArray();
        List<Character> str=new ArrayList<>();
        for (char s:ch1) {
            str.add(s);
        }
        int j=0;
        for (int i=0;i<str.size();i++){
            for(j=0;j<ch2.length;j++){
                if(str.get(i)==ch2[j]){
                    break;
                }
            }
            if(j>=ch2.length){
                System.out.print(str.get(i));
            }
        }
    }
    public static void main(String[] args) {
        String str1="welcome to bit";
        String str2="come";
        func(str1,str2);
    }
    public static void main1(String[] args) {
        String str1="welcome to bit";
        String str2="come";
        char ch1[]=str1.toCharArray();
        char ch2[]=str2.toCharArray();
        int j=0;
        for (int i = 0; i <ch1.length; i++) {
            for (j=0;j< ch2.length;j++){
                if(ch1[i]==ch2[j]){
                    break;
                }
            }
            if(j>=ch2.length){
                System.out.print(ch1[i]);
            }
        }
    }
}
